<?
$methods_of_discp = set_value('methods_of_discp',$student->d_method_of_discipline);
$who_handles_discp_home = set_value('who_handles_discp_home',$student->d_handles_discipline);
$how_effective_discp = set_value('how_effective_discp',$student->d_discipline_effective);
$rod_discp = set_value('rod_discp',$student->d_discipline_rod_why);
$allow_teacher_use_rod = set_value('allow_teacher_use_rod',$student->d_teacher_use_rod_why);
$what_form_of_discp_use = set_value('what_form_of_discp_use',$student->d_suggest_discipline);
$school_supp_discp = set_value('school_supp_discp',$student->d_school_help_discipline);
$other_info_about_child = set_value('other_info_about_child',$student->d_provide_information);


//CHECK if value updated , if yes check if approve, denied  or pending
/*
 * Function located at parent_helper
 */

$profile_request = isset($profile_request) ? $profile_request : false;
$req_id = isset($req_id) ? $req_id : 0;

$is_methods_of_discp = req_check_if_updated($req_id,'d_method_of_discipline',$student->d_method_of_discipline, $profile_request);
$is_who_handles_discp_home = req_check_if_updated($req_id,'d_handles_discipline',$student->d_handles_discipline, $profile_request);
$is_how_effective_discp = req_check_if_updated($req_id,'d_discipline_effective',$student->d_discipline_effective, $profile_request);
$is_rod_discp = req_check_if_updated($req_id,'d_discipline_rod_why',$student->d_discipline_rod_why, $profile_request);
$is_allow_teacher_use_rod = req_check_if_updated($req_id,'d_teacher_use_rod_why',$student->d_teacher_use_rod_why, $profile_request);
$is_what_form_of_discp_use = req_check_if_updated($req_id,'d_suggest_discipline',$student->d_suggest_discipline, $profile_request);
$is_school_supp_discp = req_check_if_updated($req_id,'d_school_help_discipline',$student->d_school_help_discipline, $profile_request);
$is_other_info_about_child = req_check_if_updated($req_id,'d_provide_information',$student->d_provide_information, $profile_request);
?>

<div>
		<div class="panel callout"><h6>DISCIPLINE</h6></div>
		<?=form_open('',' class="custom profile_form" id ="descipline" ')?>
		<div>
			<label class="radius secondary label">Methods of discpline used at home (please be specific)</label> <?=$is_methods_of_discp->checkbox?>
			<?=form_error('methods_of_discp');?>
			<textarea class="<?=$is_methods_of_discp->changed ? $is_methods_of_discp->class : '' ?>" name="methods_of_discp"><?=$methods_of_discp;?></textarea>
		</div>
		<div>
			<label class="radius secondary label">Who handles the discipline at home?</label> <?=$is_who_handles_discp_home->checkbox?>
			<?=form_error('who_handles_discp_home');?>
			<input class="<?=$is_who_handles_discp_home->changed ? $is_who_handles_discp_home->class : '' ?>" type="text" name="who_handles_discp_home" value="<?=$who_handles_discp_home;?>">
		</div>
		<div>
			<label class="radius secondary label">How effective is the discipline on your child?</label> <?=$is_how_effective_discp->checkbox?>
			<?=form_error('how_effective_discp');?>
			<input class="<?=$is_how_effective_discp->changed ? $is_how_effective_discp->class : '' ?>" type="text" name="how_effective_discp" value="<?=$how_effective_discp;?>">
		</div>
		<div>
			<label class="radius secondary label">Do you believe in the use of the rod as a form of discipline? Why?</label> <?=$is_rod_discp->checkbox?>
			<?=form_error('rod_discp');?>
			<input class="<?=$is_rod_discp->changed ? $is_rod_discp->class : '' ?>" type="text" name="rod_discp" value="<?=$rod_discp;?>">
		</div>
		<div>
			<label class="radius secondary label">Will you allow the TEACHER to use the rod in school ONLY WHEN NECESSARY?</label> <?=$is_allow_teacher_use_rod->checkbox?>
			<?=form_error('allow_teacher_use_rod');?>
			<input class="<?=$is_allow_teacher_use_rod->changed ? $is_allow_teacher_use_rod->class : '' ?>" type="text" name="allow_teacher_use_rod" value="<?=$allow_teacher_use_rod;?>">
		</div>
		<div>
			<label class="radius secondary label">If Not What form of discipline do you suggest we user on your child?</label> <?=$is_what_form_of_discp_use->checkbox?>
			<?=form_error('what_form_of_discp_use');?>
			<input class="<?=$is_what_form_of_discp_use->changed ? $is_what_form_of_discp_use->class : '' ?>" type="text" name="what_form_of_discp_use" value="<?=$what_form_of_discp_use;?>">
		</div>
		<div> 
			<label class="radius secondary label">How can the school be of help in supporting your mode if discipline?</label> <?=$is_school_supp_discp->checkbox?>
			<?=form_error('school_supp_discp');?>
			<input class="<?=$is_school_supp_discp->changed ? $is_school_supp_discp->class : '' ?>" type="text" name="school_supp_discp" value="<?=$school_supp_discp;?>">
		</div>
		<div>
			<label class="radius secondary label-good">What other information can you provide us regarding your child's behavior, personality or development that you believe would aid us in dealing or enhancing his development?</label> <?=$is_other_info_about_child->checkbox?>
			<?=form_error('other_info_about_child');?>
			<textarea class="<?=$is_other_info_about_child->changed ? $is_other_info_about_child->class : '' ?>" name="other_info_about_child"><?=$other_info_about_child;?></textarea>
		</div>
		<?/*if(isset($student->edit) && $student->edit === 1):?>
			<div>
				<input type="hidden" name="profile_id" value="<?=$student->profile_id;?>">
				<input type="hidden" name="enrollment_id" value="<?=$student->enrollment_id;?>">
				<input type="hidden" name="update_discipline" value="true">
				<input type="submit" name="update_discipline" value="Update DISCIPLINE"  class="btn btn-primary">
			</div>
		<?endif;*/?>
		</form>
</div>